package redis

import (
	"fmt"

	redis2 "github.com/gomodule/redigo/redis"
)

type ping struct {
	connect redis2.Conn
}

func (p *ping) Ping() bool {
	_, err := p.connect.Do("PING")
	if err != nil {
		return false
	}
	defer p.connect.Close()
	fmt.Println("redis:连接成功")
	return true
}
